.inbiz-message {
  height: 100%;
  font-size: 20px;
  display: flex;
  flex-direction: column;

  .ant-tabs-nav::before {
    border: none !important;
  }

  .ant-tabs-tab {
    .ant-badge {
      color: var(--inbiz-color-text);
      user-select: none;
    }

    .msg-tab-name {
      line-height: 35px;

      &:hover {
        color: var(--inbiz-color-primary);
      }
    }
  }

  .ant-tabs-nav-operations {
    button {
      &:hover {
        color: var(--inbiz-color-primary);
      }
    }
  }

  .ant-tabs-tab-active {
    .ant-badge {
      color: var(--inbiz-color-primary);
    }
  }

  .controlBox {
    display: flex;
    justify-content: flex-end;
    color: var(--inbiz-color-text);

    .msg-button {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 32px;
      margin-left: 5px;
      padding: 12px;
      background-color: var(--inbiz-color-bg);
      // border: solid 1px var(--inbiz-color-border-base);
      // border-radius: var(--inbiz-border-radius-base);

      .msg-title {
        margin-left: 7px;
      }

      .msg-dropdown {
        display: flex;
        align-items: center;

        .message-icon {
          display: flex;
          margin-left: 2px;
          transition: all cubic-bezier(0.12, 0.71, 0.2, 0.99) 0.3s;
        }

        .message-icon-open {
          transform: rotate(180deg);
        }
      }

      &:hover {
        color: var(--inbiz-color-bg);
        color: var(--inbiz-color-primary);
        // border: 1px solid var(--inbiz-color-primary);
        cursor: pointer;
      }
    }
  }

  .ant-badge-count {
    z-index: 1;
    min-width: 16px;
    height: 16px;
    padding: 0 2px;
    top: 8px;
    right: 8px;
    color: #fff;
    font-weight: normal;
    font-size: 12px;
    line-height: 16px;
    white-space: nowrap;
    text-align: center;
    background: #ff4d4f;
    border-radius: 8px;
    box-shadow: 0 0 0 1px #fff;

    .ant-scroll-number-only {
      height: 16px;
    }
  }

  .ant-tabs>.ant-tabs-nav .ant-tabs-nav-wrap {
    transform: none;
  }

  .message-modal-Icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 18px;

    &:hover {
      color: var(--inbiz-color-primary) !important;
      background-color: rgba(var(--inbiz-color-primary-toRGB), 0.1);
    }
  }

  .inbiz-BizBody {
    display: flex;
    flex-direction: column;
    overflow: hidden !important;

    .message-modal-icon-box .ant-badge-count {
      top: 8px;
      right: 8px;
    }

    &>.ant-tabs {
      height: 100%;

      &>.ant-tabs-nav {
        margin: 0;
      }

      .ant-tabs-tab {
        margin: 0 0 0 12px;
        padding-right: 20px;

        .ant-badge-count {
          right: 0;
        }

        &:first-child {
          margin: 0;
        }
      }

      .ant-tabs-ink-bar {
        bottom: 13px;
        display: flex;
        padding-right: 20px;
        background: transparent;

        &::before {
          flex: 1;
          background: var(--ant-primary-color);
          content: '';
        }
      }

      &>.ant-tabs-content-holder>.ant-tabs-content {
        height: 100%;

        .ant-spin-nested-loading {
          height: 100%;

          .ant-spin-container {
            height: 100%;
            display: flex;
            flex-direction: column;

            .messageDetail {
              flex: 1;
              overflow: auto;
            }
          }
        }
      }
    }
  }
}

.msg-pagination {
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;

  .ant-pagination-mini li .ant-pagination-item-link {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.msg-detail {
  position: relative;
  box-sizing: border-box;
  padding: 15px;
  color: var(--inbiz-color-text);
  border-radius: 8px;

  .msg-header {
    position: relative;
    display: flex;
    justify-content: space-between;

    .ant-badge-status-error {
      background-color: #f05e48;
    }

    .ant-badge-status-dot {
      width: 10px;
      height: 10px;
    }

    .msg-title {
      max-width: calc(100% - 200px);
      padding-left: 10px;
      overflow: hidden;
      color: var(--inbiz-color-text);
      font-weight: bold;
      font-size: 14px;
      letter-spacing: 0;
      white-space: nowrap;
      text-overflow: ellipsis;

      // &:hover {
      //   color: var(--inbiz-color-primary);
      // }
    }

    .msg-time {
      color: var(--inbiz-color-secondary-text);
      font-size: 12px;
    }
  }

  .msg-content {
    position: relative;
    display: block;
    max-height: 60px;
    margin-top: 10px;
    padding-left: 10px;
    overflow: hidden;
    transition: all ease;

    &-nav {
      display: -webkit-box;
      overflow-x: auto;
      overflow-y: hidden;
      font-size: 12px;
      line-height: 20px;
      text-overflow: ellipsis;
      word-break: break-word;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;

      code {
        padding: 0.1rem 0.2rem;
        background-color: #e8e8e8;
        border-radius: 3px;
      }

      p {
        margin-bottom: 0;
      }

      ul {
        padding-inline-start: 20px;
        list-style: disc;
      }

      ol {
        padding-inline-start: 20px;
        list-style: decimal;
      }

      em {
        font-style: italic;
      }

      hr {
        display: block;
        overflow: hidden;
        unicode-bidi: isolate;
        border-style: inset;
        border-width: 1px;
        margin-block-start: 0.5em;
        margin-block-end: 0.5em;
        margin-inline-start: auto;
        margin-inline-end: auto;
      }
    }

    &-nav-hide {
      position: absolute;
      top: 0;
      font-size: 12px;
      line-height: 20px;
      opacity: 0;
      pointer-events: none;
    }
  }

  .isColl {
    display: block;
    max-height: 10000px;
  }

  .msg-open {
    display: flex;
    justify-content: end;
    margin-top: 5px;
    font-size: 12px;

    .message-icon {
      display: flex;
      align-items: center;
      justify-content: center;
      margin-left: 6px;
      transition: all cubic-bezier(0.12, 0.71, 0.2, 0.99) 0.3s;

      rect,
      path {
        fill: var(--inbiz-color-text);
      }
    }

    .message-icon-open {
      transform: rotate(180deg);
    }

    .message-icon-close {
      transform: rotate(0deg);
    }

    &:hover {
      color: var(--inbiz-color-primary);
      cursor: pointer;

      .message-icon {

        rect,
        path {
          fill: var(--inbiz-color-primary);
        }
      }
    }
  }
}

.msg-modal {
  overflow: hidden !important;

  .ant-modal-title {
    .msg-modal-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-right: -10px;
      color: var(--inbiz-color-heading);

      >div {
        display: flex;
        align-items: center;
      }

      .anticon {
        &:hover {
          color: rgba(0, 0, 0, 0.75);
          cursor: pointer;
        }

        color: rgba(0, 0, 0, 0.45);
      }
    }
  }

  .ant-modal-content {
    width: 100%;
    height: 100%;
    min-height: 257px;

    .msg-header {
      display: flex;
      justify-content: space-between;

      .msg-header-left {
        display: flex;
        justify-content: space-between;

        .msg-button {
          display: flex;
          align-items: center;
          color: var(--inbiz-color-text);

          &:first-child {
            margin-right: 30px;
          }

          &:hover {
            color: var(--inbiz-color-primary);
            cursor: pointer;
          }
        }

        .msg-title {
          margin-left: 6px;
        }
      }

      .msg-header-right {
        display: flex;
        justify-content: space-between;
        color: var(--inbiz-color-text);

        .msg-dropdown {
          position: relative;
          display: flex;
          align-items: center;
          height: 22px;

          .msg-dropdown-item {
            display: flex;

            .ant-dropdown-menu-title-content {
              overflow: hidden;
              color: var(--inbiz-color-text);

              .ant-badge {
                overflow: hidden;

                .ant-badge-count {
                  position: relative;
                  right: 0;
                  margin-right: 5px;
                }
              }
            }

            .ant-badge {
              color: var(--inbiz-color-text);

              div {
                max-width: 140px;
                overflow: hidden;
                line-height: 20px;
                white-space: nowrap;
                text-overflow: ellipsis;
              }
            }
          }

          .message-icon {
            display: flex;
            margin-left: 2px;
            transition: all cubic-bezier(0.12, 0.71, 0.2, 0.99) 0.3s;
          }

          .message-icon-open {
            transform: rotate(180deg);
          }
        }

        .ant-dropdown-trigger {
          &:last-child {
            margin-left: 30px;
          }

          &:hover {
            color: var(--inbiz-color-primary);
            cursor: pointer;

            .ant-badge {
              color: var(--inbiz-color-primary);
              cursor: pointer;
            }
          }
        }

        sup {
          position: absolute;
          top: -5px;
          right: -9px;
        }
      }
    }

    .msg-modal-content {
      height: 480px;
      padding: 15px 0 0 0;
      overflow: auto;

      .messageDetail {
        height: 417px;
        margin: 0;
        overflow: auto;
      }

      .ant-pagination {
        margin: 0 !important;
      }


    }

    .msg-modal-content-full {
      max-height: calc(100vh - 80px);
      padding: 15px 0 10px 0;
      overflow: auto;

      .messageDetail {
        max-height: calc(100vh - 150px);
        margin: 0;
        overflow: auto;
      }
    }
  }

  .ant-badge-count {
    z-index: 1;
    min-width: 16px;
    height: 16px;
    padding: 0 2px;
    color: #fff;
    font-weight: normal;
    font-size: 12px;
    line-height: 16px;
    white-space: nowrap;
    text-align: center;
    background: #ff4d4f;
    border-radius: 8px;
    box-shadow: 0 0 0 1px #fff;

    .ant-scroll-number-only {
      height: 16px;
    }
  }
}

.msg-tabs-popup.ant-dropdown,
.msg-tabs-popup.ant-tabs-dropdown {
  width: 160px;
  padding: 8px 0 8px 8px;
  background-color: #fff;
  background-clip: padding-box;
  border-radius: 2px;
  outline: none;
  box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08),
    0 9px 28px 8px rgba(0, 0, 0, 0.05);

  .ant-badge-count {
    min-width: 16px;
    height: 16px;
    padding: 0 2px;
    font-weight: normal;
    font-size: 12px;
    line-height: 16px;
    border-radius: 8px;

    .ant-scroll-number-only {
      height: 16px;
    }
  }

  ul {
    &::-webkit-scrollbar {
      width: 6px;
      height: 6px;
      background-color: transparent;
    }

    &:hover {

      /* 定义滚动条轨道内阴影+圆角 */
      &::-webkit-scrollbar-track {
        background-color: transparent;
      }

      /* 定义滑块内阴影+圆角 */
      &::-webkit-scrollbar-thumb {
        background-color: #d9d9d9;
        border-radius: 4px;
      }
    }

    max-height: 216px;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: transparent;
    box-shadow: none;
    scrollbar-width: thin;
  }

  sup {
    position: absolute;
    top: 12px;
    right: 5px;
    transform: translate(0, 0);
  }

  // 弹窗的下拉框
  .ant-tabs-dropdown-menu-item,
  .ant-dropdown-menu-item {
    position: relative;
    width: 144px;
    padding: 0;

    >span,
    .ant-dropdown-menu-title-content {
      display: flex;
      flex: 1;
      align-items: center;
      height: 40px;
      padding-left: 5px;
      overflow: hidden;
      color: var(--inbiz-color-text);

      .ant-badge {
        overflow: hidden;

        .ant-badge-count {
          position: relative;
          right: 0;
          margin-right: 5px;
        }
      }
    }

    .msg-tab-name,
    .ant-badge {
      display: flex;
      flex: 1;

      div {
        flex: 1;
        height: 40px;
        margin: 0;
        overflow: hidden;
        color: var(--inbiz-color-text);
        line-height: 40px !important;
        white-space: nowrap;
        text-overflow: ellipsis;
      }
    }
  }
}

.msg-tabs-popup.ant-dropdown.msg-tabs-popup-filter {
  width: 100px;

  .ant-dropdown-menu-item {
    width: 84px;
  }
}

.message-modal-full.ant-modal {
  top: 0 !important;
  left: 0 !important;
}

.message-notification {
  .ant-notification-notice-content {
    width: 100%;

    .ant-notification-notice-message {
      margin-bottom: 0;

      .modal-message {
        display: flex;
        justify-content: flex-start;
        padding-right: 22px;
        font-size: 14px;

        .message-icon {
          display: flex;
          align-items: center;
          padding-right: 12px;
          font-size: 20px;
        }

        .message-title {
          padding-right: 5px;
          overflow: hidden;
          color: #666;
          white-space: nowrap;
          text-overflow: ellipsis;
          cursor: pointer;
        }

        .message-see {
          min-width: 56px;
          color: var(--inbiz-color-primary);
          text-decoration: underline;
        }
      }
    }
  }

  .ant-notification-notice-close {
    right: 12px;
  }
}

.inbiz-message-tab-modal {
  .ant-modal-header {
    padding: 0;
  }

  .ant-modal-body {
    padding: 0;
  }

  .modal-box {
    display: flex;
    height: 600px;

    .modal-left {
      height: 100%;
      display: flex;
      min-width: 190px;
      max-width: 190px;
      overflow: hidden;
      padding: 0 0 10px 8px;
      flex-direction: column;
      border-right: 1px solid #eee;

      >p {
        margin: 0;
        height: 56px;
        color: #333;
        font-size: 16px;
        font-weight: normal;
        line-height: 48px;
        padding: 0 10px 8px 12px;
      }

      .model-group-list {
        flex: 1;
        display: flex;
        overflow-y: auto;
        flex-direction: column;

        >p {
          width: 174px;
          display: flex;
          font-size: 14px;
          padding: 0 12px;
          cursor: pointer;
          margin-bottom: 0;
          min-height: 40px;
          min-height: 40px;
          user-select: none;
          border-radius: 4px;
          align-items: center;
          transition: all ease .3s;

          &:hover {
            background-color: #f5f5f5;
          }

          .group-name {
            flex: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
          }

          .ant-badge-count {
            min-width: 16px;
            height: 16px;
            line-height: 16px;
            padding: 0 4px !important;
          }
        }

        .active-group {
          color: var(--inbiz-color-primary);
          background-color: var(--ant-primary-1);

          &:hover {
            background-color: var(--ant-primary-1);
          }
        }
      }
    }

    .modal-right {
      flex: 1;
      overflow: hidden;

      .ant-tabs {
        height: 100%;

        >.ant-tabs-nav {
          margin-bottom: 0;

          &:before {
            border-bottom: none;
          }

          .ant-tabs-ink-bar {
            bottom: 7px;
          }

          .ant-tabs-tab {
            font-size: 14px;
            color: #666;

            .ant-tabs-tab-btn {
              font-family: none;
            }
          }
        }


        .tabs-left-empty {
          width: 30px;
        }

        .tabs-title-handle {
          display: flex;
          padding: 0 10px;
          align-items: center;

          .msg-read-all {
            display: flex;
            cursor: pointer;
            margin-right: 10px;
            align-items: center;

            &:hover {
              .msg-title {
                color: var(--inbiz-color-primary);
              }

              .anticon {
                color: var(--inbiz-color-primary);
              }
            }

            .anticon {
              font-size: 16px;
              transform: none;
              color: #666;
            }

            .msg-title {
              margin-left: 5px;
              user-select: none;
              color: #666;
            }
          }

          .ant-btn {
            background: none;
            background-color: none;

            .anticon {
              color: #666;
            }
          }
        }

        .ant-tabs-content {
          height: 100%;

          .ant-tabs-tabpane {
            height: 100%;
            padding: 0 15px 15px;

            .ant-spin-nested-loading {
              height: 100%;

              .ant-spin-container {
                height: 100%;
                display: flex;
                flex-direction: column;

                .messageDetail {
                  flex: 1;
                  overflow-y: auto;

                  .ant-empty {
                    margin-top: 219px !important;
                  }
                }
              }
            }
          }
        }
      }

      .msg-scroll-footer {
        width: 100%;
        padding: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #999;

        >span:not(.anticon) {
          margin-left: 10px;
        }
      }
    }
  }

  .message-modal-full {
    .modal-box {
      height: 100vh;
    }
  }
}

.mes-lis-ite-con {
  position: relative;
  border-radius: 5px;
  transition: all ease .3s;

  &:hover {
    background-color: #f7f7f7;
  }

  .ant-badge-status-dot {
    width: 10px;
    height: 10px;
  }

  .ant-badge-status-error {
    background-color: #f05e48;
  }

  .inbiz-message-template-error {
    height: 50px;
    color: #f00;
    display: flex;
    padding: 0 15px;
    border-radius: 4px;
    align-items: center;
    justify-content: flex-start;
    background-color: rgba(255, 33, 0, .1);
  }
}